#!/bin/bash

PID=$( ps -ef|grep zhongche|grep -v grep|awk '{print $2}')

#-F表示用什么分割
#PID=$(netstat -anp | grep ":8081" | awk '{print $7}' | awk -F "/" '{print $1}')
if [ $? -eq 0 ]; then
    echo "process id:$PID"
else
    echo "process mblog  not exit"
    exit
fi

kill -9 ${PID}

if [ $? -eq 0 ];then
    echo "kill java 进程 成功"
else
    echo "kill java 进程 失败"
fi
